/**
 * 
 */
package com.munoor.dalai.server.model.wrappers;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.munoor.dalai.server.model.User;

/**
 * @author Osho Ilamah
 * @since  version 1.0 (27 March 2011)
 */
@XmlRootElement(name = "user")
public class UserConverter {
   private User entity = null;
    
   public UserConverter() {
	   entity = new User();
   }

   public UserConverter(User entity) {
	   this.entity = entity;
   }
   
	@XmlElement
	public String getUsername() {
		return entity.getUsername();
	}
   
	public void setUsername(String username) {
		entity.setUsername(username);
	}
   
	@XmlElement
	public String getEmail() {
		return entity.getEmail();
	}
   
	public void setEmail(String email) {
		entity.setEmail(email);
	}
	
	@XmlElement
	public String getPassword() {
		return entity.getPassword();
	}
   
	public void setPassword(String password) {
		entity.setPassword(password);
	}
	
	@XmlElement
	public long getUserId() {
		return entity.getUserId();
	}
   
	public void setUserId(long userId) {
		entity.setUserId(userId);
	}
	
/*	@XmlElement
	public long getUserId() {
		return entity.getUserId();
	}
   
	public void setUserId(long userId) {
		entity.setUserId(userId);
	}*/
	
	@XmlElement
	public long getLastScan() {
		return entity.getLastScan();
	}
   
	public void setLastScan(long lastScan) {
		entity.setLastScan(lastScan);
	}
	
	@XmlElement
	public short getUserType() {
		return entity.getUserType();
	}
   
	public void setUserType(short userType) {
		entity.setUserType(userType);
	}
	
	public User unmarshall() {
		return entity;
	}
}
